Imports CrystalDecisions.CrystalReports.Engine
Partial Class Content_P002_REP_L_N
    Inherits System.Web.UI.Page
    Dim fcn As CLS_FCN
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        '-----Chect Authority--------
        Dim role_prg = "P002"
        Dim user_id = Session("user_id")
        Dim cls_aut As New AUTHORITY

        If cls_aut.DoCheck(user_id, role_prg) = "0" Then
            Me.Response.Redirect("ERROR_AUT.aspx")
        End If

        fcn = New CLS_FCN
        Dim pDate As String = Me.Request.QueryString("date")
        Dim tType1 As String = Me.Request.QueryString("type1")
        '---Crystal Report------
        Dim rpt As New ReportDocument
        rpt.Load(Server.MapPath("P002_L.rpt"))
        rpt.SetDatabaseLogon("exatpty", "exatpty")
        rpt.SetParameterValue("payDate", fcn.GetDate(pDate))
        rpt.SetParameterValue("payDate1", fcn.GetDate(pDate))
        rpt.SetParameterValue("payDate2", fcn.GetDate(pDate))
        'rpt.SetParameterValue("payDate3", fcn.GetDate(pDate))
        'rpt.SetParameterValue("payDate4", fcn.GetDate(pDate))

        'rpt.SetDataSource(ds.Tables(0))
        Me.P002_l.ReportSource = rpt
    End Sub
End Class
